projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6f67f52
)
label: plug a memory leak
author
Cosimo Cecchi
<cosimoc@gnome.org>
Tue, 7 Dec 2010 09:13:32 +0000
(10:13 +0100)
committer
Cosimo Cecchi
<cosimoc@gnome.org>
Tue, 7 Dec 2010 09:13:32 +0000
(10:13 +0100)
gtk/gtklabel.c
patch
|
blob
|
history
diff --git
a/gtk/gtklabel.c
b/gtk/gtklabel.c
index 563845c8d4eb2cd0ed47601e6b554f0cfe2f06c3..53b2df7eae9d6b2893f3e4110215ff0743c0b939 100644
(file)
--- a/
gtk/gtklabel.c
+++ b/
gtk/gtklabel.c
@@
-3014,13
+3014,19
@@
get_font_metrics (PangoContext *context, GtkWidget *widget)
{
GtkStyleContext *style_context;
PangoFontDescription *font;
+ PangoFontMetrics *retval;
style_context = gtk_widget_get_style_context (widget);
gtk_style_context_get (style_context, 0, "font", &font, NULL);
- return pango_context_get_metrics (context,
- font,
- pango_context_get_language (context));
+ retval = pango_context_get_metrics (context,
+ font,
+ pango_context_get_language (context));
+
+ if (font != NULL)
+ pango_font_description_free (font);
+
+ return retval;
}
static void